Nonvolatile memory, such as flash memory, is capable of retaining digital information until erased. Some flash memory products may perform power-loss recovery (PLR) operations to identify invalid data generated by the loss of power to the flash memory and reclaim operations to recover flash memory space consumed by invalid data. The reclaim operations generally may involve targeting a flash block containing invalid data, copying any valid data in the targeted flash block to a separate memory location, and then erasing the targeted flash block to recover the flash memory space.
Current methods for performing PLR and reclaim operations may require the ability to go back to previously programmed areas of the flash memory. For example, erasing flash memory to reclaim space may involve a process known as “bit-twiddling” in which certain bits are altered in the header of a flash block to indicate the progress of file system operations during reclaim. Moving forward, however, flash memory may enforce a sequential addressing requirement that restricts the ability to go back to previously programmed flash blocks. Therefore, there is a need for improved techniques to perform operations in flash memory under sequential addressing restrictions while satisfying PLR requirements of the file system.